package com.itboye.ihomebank.custom.camera;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.itboye.ihomebank.R;
import com.itboye.ihomebank.base.BaseOtherActivity;

/**
 * 自定义相机界面，抠图
 */
public class CameraActivity extends BaseOtherActivity {
    private Button take_pic;
    private CameraSurfaceView mCameraSurfaceView;
    private CameraTopRectView rectOnCamera;

    public static CameraActivity activitys;

    public static CameraActivity getInstance() {
        return activitys;
    }
    @Override
    protected int layout_id() {
        return R.layout.activity_camera;
    }

    @Override
    protected void onInitController() {
    }

    @Override
    protected void onInit() {
        activitys=this;
        take_pic= (Button) findViewById(R.id.take_pic);
        mCameraSurfaceView = (CameraSurfaceView) findViewById(R.id.cameraSurfaceView);
    }

    @Override
    protected void onReadIntent(Bundle bundle) {

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.take_pic:
                mCameraSurfaceView.takePicture(CameraActivity.this);
                break;
        }
    }
}
